<?php
error_reporting(E_ALL || ~E_NOTICE);
include('config.php');
session_start();
$user_check = $_SESSION['login_user'];
$user_type = $_SESSION['user_type'];
$user_name = $_SESSION['user_name'];

mysqli_select_db($conn,"Lib"); //连接数据库
$ses_sql=mysqli_query($conn,"SELECT student_id FROM user WHERE student_id='{$user_check}' ");

$row=mysqli_fetch_array($ses_sql,MYSQLI_ASSOC);

$login_session=$row['student_id'];

$type_sql=mysqli_query($conn,"SELECT type FROM user WHERE student_id='{$user_check}' ");
$row2=mysqli_fetch_array($type_sql,MYSQLI_ASSOC);
$login_type = $row2['type'];

if($login_session=="")
{
	$login_session = "guest";
	/*header("Location: ../../pages/index.php");*/
}

?>